Skip to content

Prepare for 13.4.1 release - #2788

Merged
leofang merged 177 commits into
NVIDIA:13.4.xfrom
mdboom:13.4.x
Sep 9, 2026
Merged

Prepare for 13.4.1 release#2788
leofang merged 177 commits into
NVIDIA:13.4.xfrom
mdboom:13.4.x

Conversation

@mdboom

@mdboom mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This includes:

  • Updating to latest main
  • Removing the workaround support for fetching CTK prereleases in CI
  • Supporting building Windows-on-ARM wheels (based on CI: build Windows ARM64 wheels for stable CUDA #2685, but significantly updated to based on main's version of CI, not the workarounds)
  • Release note updates
  • Updating various versions throughout docs and the CI matrix
  • cuda_pathfinder update for cupti dlls

EDIT: The failing griffe check (CI / API check (cuda_core vs. merge base) (push)) is a false positive. It comes from the fact that we have skipped over 2 version updates of stubgen-pyx and the old form and the new form of the .pyi files look like API breakage, but in fact aren't. This can be confirmed by looking at the source _device_node.pyx file where this is no actual change and is also confirmed by the API check against the latest cuda-core release is passing.

juenglin and others added 30 commits July 28, 2026 14:08
…A#2434)

Declare cdef locals at their point of initialization rather than at the
top of the function, and replace field-by-field struct setup with
Cython's struct-initializer syntax.

Only complete initializers are converted. Cython does not zero-fill
omitted members, so a partial initializer would leave them holding stack
garbage; sites that depend on a preceding memset are left unchanged.
Where every member is now supplied, the redundant memset is dropped.

No behavior change.
…ersions.yml (NVIDIA#2306)

* Got initial version to address issue 2183. Let pre-commit check covers pixi cuda version pins to ci/versions.yml

* rename to be more accurate

* make error message more readable and accurate

* put cuda_bindings / cuda_core to error message to be best accurate

* add docstring

* rename cuda_feature from cu13 to cu{major} to support bumping major version, e.g. 13.x.x to 14.x.x

* add extracted line from pixi files to shown when check OK

* add concrete build version alon side with expected version

* polish to fix cosmetic

* address pre commit check

* Pin pyyaml in check-pixi-cuda-version pre-commit hook
…stream, green context, and tensor map (NVIDIA#2404)

Signed-off-by: Rui Luo <ruluo@nvidia.com>
…VIDIA#2347)

* test(core): add cuda.core.__all__ vs public docs consistency check

Closes NVIDIA#2326.

Parses docs/source/api.rst (autosummary entries and data directives while
cuda.core is the active module) and compares the flat public names against
cuda.core.__all__ in both directions. Dotted entries such as graph.Graph or
checkpoint.Process are submodule namespaces and are excluded. Symbols
documented in api_private.rst are accepted as documented so returned-helper
docs do not fail the check.

The tests skip when cuda.core.__all__ is not defined, so this lands
independently of NVIDIA#2300 and activates once NVIDIA#2300 merges. Also adds the
__all__-names-resolve guard suggested in the NVIDIA#2300 review.

Signed-off-by: Aryan <aryansputta@gmail.com>

* test(core): land cuda.core.__all__ and extend docs check to public subpackages

Addresses review feedback that the consistency check was too narrow:

- Define cuda.core.__all__ (flat public namespace) so the check runs instead
  of skipping, and add an aggregated __all__ to cuda.core.graph derived from
  its star-imported submodules.
- Auto-discover public subpackages from cuda.core.__path__ (graph, system,
  texture, utils, and any added later; the internal cuNN wheel shims are
  excluded) and assert each defines a fully resolvable __all__.
- Cross-check each documented subpackage's __all__ against api.rst, handling
  both the dotted (graph.Graph) and flat (currentmodule) doc conventions.
  system is documented in api_nvml.rst, so its doc cross-check is skipped.

* test(core): parse API docs with docutils

* Update content to pass current tests

* Add docutils dependency to pyproject.toml

* Simplify checks.  No longer make sure that everything documented is public.

* test(core): document intentional scope limits of api docs consistency check

* Reorganize __all__

* Fix doc reference

* Address findings in PR

* Fix tests and make __all__ construction consistent

* test(core): drop IPC types from _memory package contents expectation

_ipc.__all__ is now empty, so `from cuda.core._memory import *` no longer
binds IPCAllocationHandle or IPCBufferDescriptor. Update the expected list
in test_package_contents to match.

Signed-off-by: Aryan <aryansputta@gmail.com>

---------

Signed-off-by: Aryan <aryansputta@gmail.com>
Co-authored-by: Michael Droettboom <mdroettboom@nvidia.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
…_bindings (NVIDIA#2451)

* Fix version parsing in cuda_core

* Fix enum checks
* chore: -Werror for cythonization in cuda.core

* chore: -Werror for cythonization in cuda.bindings

* address review feedback

* fix other cython warnings missed locally
…e builds (NVIDIA#2424)

* docs: document setuptools-scm clone requirements for source builds

Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com>

* Applied review suggestions from @mdboom

Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com>

---------

Signed-off-by: Bharat Raghunathan <bharatrgatech@gmail.com>
* feat(cuda.core): add event record node updates

Use the generic node setter with failure-atomic attachment replacement, establishing the shared path for definition-level parameter mutation.

* test(cuda.core): remove unused graph update import

* feat(cuda.core): add event wait and host node updates

Extend definition-level mutation to event waits and both Python and ctypes host callbacks while preserving old executable state and attachment ownership.

* feat(cuda.core): require CUDA 12.2 for node updates

Report unsupported driver or binding versions before preparing mutation attachments or calling the generic node setter.

* feat(cuda.core): add memset node updates

Allow partial memset parameter replacement while preserving graph-owned destination lifetimes and previously instantiated graph behavior.

* feat(cuda.core): add memcpy node updates

Support partial copy parameter replacement while preserving independent source and destination ownership across graph instantiations.

* feat(cuda.core): add kernel node updates

Support independent launch configuration and argument replacement while requiring explicit arguments when changing kernels.

* feat(cuda.core): add child graph node updates

Replace embedded child hierarchies while preserving attachment metadata, invalidating stale views, and keeping existing executables independent.

* docs(cuda.core): document graph node updates

Describe supported mutation methods, CUDA 12.2 requirements, and executable graph behavior in the API and release notes.

* fix(cuda.core): avoid cross-extension deleter symbol

Use type-erased shared ownership for prepared child updates so extension loading does not depend on a hidden C++ deleter symbol.

* fix(cuda.core): align prepared child update stub

Reflect shared ownership for the opaque child update transaction in the generated stub.

* api(cuda.core): make partial node updates keyword-only

Make memcpy and memset mutation calls explicit and unambiguous before the public API freezes.

* fix(cuda.core): harden graph node updates

Preserve memory-node contexts, reject unsupported node forms, and fail clearly when child graph metadata cannot be updated.

* fix(cuda.core): support older bindings in node updates

Resolve the CUDA 13.2 graph parameter getter dynamically so CUDA 12 binding builds remain compilable.

* fix(cuda.core): harden memory node updates

Clarify parameter handling and cover host/device memory transitions while exposing context-sensitive test teardown for follow-up.

* test(cuda.core): reject updates to destroyed nodes

Cover the public invalid-node state to ensure parameter updates fail cleanly without restoring graph membership.
…ocationHandle (NVIDIA#2418)

Defect 4 of NVIDIA#2388.

Signed-off-by: Aryan <aryansputta@gmail.com>
* Add identity preserving pattern to critical_sections

this is annoying, but at least the library and probably kernel
attributes should be idempotent.
But critical sections *can and will be* released (similar to the GIL
although not sure what is more likely).

The important thing to note here is that the final attribute setting
section is self-contained and holds the lock (even if another thread
may have already set the attribute or still be executing the code
above).

* Use call-once pattern for module loading as double-load is problematic

As per review by Keith

* Minimal thread-unsafe initialization order fixes
…VIDIA#2393)

* Make Windows pathfinder searches architecture-aware

* Avoid Windows architecture detection on Linux

* Rename unsupported architecture error

* Skip CUDA 12 wheel paths on Windows ARM64

* Restore ARM64 cudla CTK search path

* Group Windows search paths by architecture

* Add architecture-specific Windows path tables

* Make Windows CTK libnames architecture-aware

* Add Windows architecture availability helper

* Correct cuSPARSELt Windows ARM64 wheel path

* Correct Windows CTK NVVM and CUPTI paths

* Validate Windows NVVM binary architecture

* Remove Windows architecture availability helper

* Remove site-package catalog generation tool

* Move pathfinder changes to 1.6.1 release notes

* Remove pathfinder catalog generation tools

* Restore site-packages collection scripts

* Use platform-specific supported library names

* Regenerate pathfinder 1.6.1 release notes

* Remove redundant Windows libname consistency test

* Mark agent-authored pathfinder tests

* Clarify Windows binary architecture validation

* Use all available dynamic library names

* Test Windows site-package libraries by architecture

* Require exactly one Windows architecture flag

---------

Co-authored-by: Michael Wang <isVoid@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
* Make pre-commit work on Windows

* Update .pre-commit-config.yaml

* Address some of the comments in the PR

* Simplify type-checking

* Address comments in PR

* Simplifications

* Fix simplifications

* Fix type check

* Add comment about stubgen-pyx issues

* Update CONTRIBUTING.md

Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>

* Update cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_dl_windows.py

---------

Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
As Keith noted, this is needed for using the `py_safe_call_once`
definitions, Cython 3.2.5 changelog:
https://cython.readthedocs.io/en/latest/src/changes.html

(I guess the bump in the pre-commit is likely not strictly needed, but
there also were no stub changes.)
* ci: drop custom NumPy builds for Python 3.15

Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com>

* ci: enable scientific-python-nightly-wheels index for Python 3.15

Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com>

* ci: set PIP_ONLY_BINARY and relax numpy version pin for Python 3.15

Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com>

* Fix NumPy version in pyproject.toml and try re-adding windows python 3.15

* Bump cibuildwheel to 4.1.1 (which uses containers with 3.15 b4)

* Revert "Use Python 3.15b2 for now until cibuildwheel is updated (NVIDIA#2433)"

This reverts commit 3ef82d6.

* Add allow-prereleases to windows CI to try and run 3.15

* Exclude ml-dtypes from windows (builds in 1 minute on linux so kept it)

* Drop windows 3.15t again as psutil doesn't have free-threaded wheels

---------

Signed-off-by: tirthpatel90 <tirthpatel5393@gmail.com>
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
Compare raw NVML device architecture values so architectures newer than the generated DeviceArch enum do not raise ValueError before the threshold query. Add regression coverage for an unrecognized architecture value.
NVIDIA#2409)

* fix(cuda.core): fall back to driver when nvJitLink < 12.3 is installed

Stop probing nvJitLink availability via module.version(), which calls
the unversioned nvJitLinkVersion symbol missing in nvJitLink 12.0-12.2.
Use symbol pointer inspection via _nvjitlink_has_version_symbol()
instead, restoring cuda-core 0.6.0 fallback behavior.

Fixes NVIDIA#2408

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* test(cuda.core): add coverage for nvJitLink <12.3 driver fallback

Add regression tests for Linker.which_backend() and
_decide_nvjitlink_or_driver() when the nvJitLinkVersion symbol is
missing (nvJitLink 12.0-12.2).

Related to NVIDIA#2408

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(cuda.core): add 1.2.0 release note for nvJitLink <12.3 fallback fix

Document the NVIDIA#2408 regression fix in the cuda.core 1.2.0 release notes.

Related to NVIDIA#2408

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cuda.core): probe nvJitLink version under DynamicLibNotFoundError guard

Address review feedback: keep the >=12.3 version-symbol check inside
_optional_cuda_import's probe so a missing nvJitLink dylib still falls
back to cuLink. Continue avoiding module.version(), which raises
FunctionNotFoundError on nvJitLink 12.0-12.2 (NVIDIA#2408).

Add coverage for missing-dylib fallback and a guard that the probe does
not call module.version().

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cuda.core): use explicit try/except for nvJitLink version probe

Address review feedback: drop the probe side-effect and catch
DynamicLibNotFoundError around _nvjitlink_has_version_symbol so missing
dylibs still fall back to cuLink. Keep avoiding module.version() for
nvJitLink <12.3 (NVIDIA#2408).

Mark newly added tests with agent_authored authorship markers.

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cuda.core): drop obsolete nvJitLink probe comments

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Michael Wang <13521008+isVoid@users.noreply.github.com>
…uda_python_test_helpers (NVIDIA#2384)

* Experiment: Install test_helpers as a package

* Try something different in CI

* Reorganize all the tests

* Update a few more imports
NVSHMEM docs now live under /nvshmem/api/latest/; the old unversioned
deep link 404s and breaks lychee on rendered docs.
…2484)

* Add context sync to teardown in init_cuda fixture

* Cap memory pool size in some tests
…#2481)

* cuda.core: return CUmodule via as_py in ObjectCode.get_module

Use the shared handle export path for legacy CUmodule interop instead of
constructing driver.CUmodule directly.

Signed-off-by: Jinfeng <jinfengl@nvidia.com>

* cuda.core: drop unused intptr_t import in _module.pyx

Satisfy cython-lint after switching get_module() to as_py().

Signed-off-by: Jinfeng <jinfengl@nvidia.com>

* cuda.core: add as_intptr overload for CUmodule

Route as_py(CUmodule) through as_intptr for consistency with other handle exports.

* let as_cu supports CUModule

---------

Signed-off-by: Jinfeng <jinfengl@nvidia.com>
… it (NVIDIA#2490)

* cuda.core: resolve default-stream context per call instead of caching it

LEGACY_DEFAULT_STREAM and PER_THREAD_DEFAULT_STREAM wrap default-stream
tokens, which denote whatever context is current. Both are module-level
singletons, and Stream_ensure_ctx / Stream_ensure_ctx_device stored the
first context and device they observed on the object and never cleared
them, so a process-wide object became permanently bound to one context.

Replace the two helpers with resolvers that return the context and device
through out-parameters and cache on the object only when the stream is not
a default-stream token. Stream.context, .device, .resources, .record(), and
__repr__ now follow the current context, a query no longer pins a context
reference for the lifetime of the process, and the shared singletons are no
longer written to from multiple threads.

Object identity is preserved, so __eq__ and __hash__ keying off the handle
are unaffected.

Fixes NVIDIA#2485

* fix(cuda.core): harden default-stream context resolution for NVIDIA#2485

Skip sticky context reuse on default-stream tokens, document ambient
context behavior on device/resources/record, and cover resources in the
multi-GPU regression test.

---------

Co-authored-by: Andy Jost <ajost@nvidia.com>
Comment thread cuda_bindings/docs/source/release/13.4.1-notes.rst Outdated
@mdboom

mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 6a49756

@mdboom
mdboom requested a review from rwgk September 9, 2026 18:16
@mdboom

mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0dda534

mdboom and others added 10 commits September 9, 2026 14:52
- Medium: [arch_check.py:84](/wrk/forked/pr2788/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py:84) converts the raw NVML architecture integer to DeviceArch while handling an expected unsupported call. An unknown future architecture raises ValueError instead of skipping. Restore cont7’s try/except and UNKNOWN(<id>) fallback.
…se None instead of specific DeviceArch values.

- Medium/low: [test_device.py:162](/wrk/forked/pr2788/cuda_bindings/tests/nvml/test_device.py:162) changed unsupported_before(device, None) to KEPLER. Mike’s pre-merge release branch and cont7 both use None; the adjacent getter does too. The current version propagates NotSupportedError on modern devices where the setter is unavailable.
@mdboom

mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 901323d

@mdboom mdboom closed this Sep 9, 2026
@mdboom mdboom reopened this Sep 9, 2026
@mdboom

mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 901323d

@mdboom

mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 452b9a1

@leofang leofang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on offline discussion (I do not read this one, will review in #2789).

@leofang
leofang merged commit 0770ab6 into NVIDIA:13.4.x Sep 9, 2026
115 of 117 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
Removed preview folders for the following PRs:
- PR #2781
- PR #2786
- PR #2788
- PR #2791
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.